'use strict';
// 获取数据库的引用
const db = uniCloud.database();
// 获取集合的引用
// const shopListCollection = db.collection('shopList');

// 获取详情表引用
const shopDetailCollection = db.collection('shopDetail')


exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	
	// 关联详情表
	const shopId = event.shopId
	let res = await shopDetailCollection.where({
		shopId
	}).get()
	
	
	//返回数据给客户端
	return res
};
